//
//  BoilingView.swift
//  Juejin App Demo
//
//  Created by 葛鹏 on 2021/8/15.
//

import SwiftUI

struct BoilingView: View {
    
    @State private var selectPhotoPresneted: Bool = false
    
    @State private var image = UIImage()
    
    var body: some View {
        
        VStack{
            Image(uiImage: image).resizable().scaledToFit()
            
            Button(action: {
                selectPhotoPresneted = true
            }, label: {
                Text("selected photo")
            }).sheet(isPresented: $selectPhotoPresneted, content: {
                ImagePicker(image: $image)
            })
        }
        
       
    }
}

struct BoilingView_Previews: PreviewProvider {
    static var previews: some View {
        BoilingView()
    }
}
